The present invention relates to a teaching method for an industrial robot and an apparatus for performing the same, and particularly, to such a method and apparatus for effecting a weaving-like movement of a designated pattern with a hand of an industrial robot such as a welding robot. That is, the hand undergoes a subordinate weaving-like movement while moving in a main direction.
For welding thick workpieces or workpieces disposed with a gap therebetween, it is necessary to cause the torch to undergo a back-and-forth weaving-like movement with respect to the workpieces. That is, in order to increase the amount of welding material deposited, it is necessary to cause the torch to undergo a certain lateral motion with respect to a principle welding line during movement of the torch along the principle welding line.
A method of performing such a weaving-like movement which has been utilized heretofore is shown conceptionally in FIG. 1. In FIG. 1, a pair of auxiliary points 4 and 5 are defined on either side of a principle welding line 3 defined by a starting point 1 and a terminating point 2. The auxiliary point 4 is located in a plane orthogonal to the principle welding line 3, at a distance of d.sub.1 from the line 3, and the auxiliary point 5 is located in a plane orthogonal to the principle welding line 3. The latter plane forms a certain angle with respect to the plane including the point 4 and is spaced at a distance of d.sub.2 from the line 3. The torch undergoes a weaving-like subordinate movement, at a constant speed in the planes so defined with a stroke length which is equal to the sum of the distances d.sub.1 and d.sub.2, while moving along the principle line 3. The torch first moves from the starting point 1 of the principle line 3 to a point 5a along a line defined by a composite vector of a vector pointing towards the terminating point 2 of the principle line 3 and a vector pointing towards the auxiliary point 5. The torch then moves to a point 1a along a line defined by a composite vector of a vector pointing towards the point 2 and a vector pointing towards the principle line 3. Continuing in this manner, the torch passes through the points 4a, 1b, 5b, 1c, 4b, 1d, etc. in succession, while a welding arc is maintained.
FIG. 2 shows a block diagram of a conventional welding robot which performs such a weaving-like movement. A welding line memory 6 stores the starting point and the terminating point. An interpolator 7 functions to calculate successive points between the starting point and the terminating point, and an auxiliary point memory 8 stores the auxiliary points. A displacement calculator 9 calculates the displacement of the torch from the principle welding line 3, and the output of the displacement calculator 9 is added by an adder 10 to the output of the interpolator 7. A rectangular coordinate value from an output terminal of the adder 10 is converted by an actuator output converter 11 into an actuator output. A welding robot 12 is actuated by the output of the converter 11 to control a hand holding a torch 13. The contents of the welding line memory 6 and the auxiliary point memory 8 are determined by teaching. The displacement calculator 9 is supplied with a weaving pattern vector W from the auxiliary point memory 8, a velocity v and a time t, and operates to calculate a displacement w according to the following equation: (see also FIG. 4) ##EQU1##
A flow chart of the operation of the calculator 9 is shown in FIG. 3.
In FIG. 3, the time t is incremented by a time counter, and w.sub.next indicates a sequential switching of the vectors w.sub.1 and w.sub.2 which extend perpendicularly from the auxiliary points 4 and 5 to the principle line 3, respectively, in the manner of w.sub.1, -w.sub.1, w.sub.2, -w.sub.2, w.sub.1, . . . .
The adder 10 functions to add a displacement p per unit time with respect to the principle line 3, which is obtained by the interpolator 7, to the displacement w obtained by the displacement calculator 9 to obtain a robot position vector r.
In the above-described conventional method, it is necessary to store not only a single point for each welding line but also two auxiliary points, and therefore much memory capacity is required. Furthermore, since it is necessary to teach the auxiliary points for every welding line, the teaching operation is very complicated when the number of sections of the principle welding line is very large, for instance, more than about one hundred. In addition, in the conventional method, the weaving-like pattern is limited to a two-dimensional plane. That is, since the conventional system utilizes perpendicular lines from the auxiliary points 4 and 5 to the principle line 3 for the displacement calculation performed by the displacement calculator 9, each single movement of the torch is limited to a plane including the vectors w.sub.1 and w.sub.2, that is, to a plane vertical to the principle line 3. In other words, because the conventional system is based on the utilization of the opposite ends of the strokes, it cannot be applied to three-dimensional weaving-like pattern.
U.S. Pat. No. 4,150,329 to Dahlstrom discloses a technique by which a three-dimensional weaving-like pattern can be traced. In Dahlstrom, the weaving-like pattern is defined by relative amounts x, y and z of movement; that is, parallel shifts in a general coordinate transformation are employed. More specifically, a position of a point on the principle welding line is determined to which relative positions are added. This system is satisfactory if the principle welding line is parallel to the z direction. However, if the principle welding line is parallel to, for example, the x direction, the weaving-like pattern may become abnormal.